﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Q.Web.Controllers
{
    public class QbaseController<T,U> : Controller
        where T : BaseServer<U>, new()
        where U : BaseGame, new()
    {
        //
        // GET: /Qbase/

        T server = new T();

        public virtual ActionResult Index(U t)
        {
            server.Save(t);
            return View();
        }

    }


    public class BaseServer<T> where T : BaseGame, new()
    {
        public virtual T Save(T t)
        {
            return t;
        }
    }

    public class BaseGame
    {
        public int Id { get; set; }
    }
}
